<template>

    <h2>登录页面</h2>
    <table border="1">
        <tr>
            <td>用户名</td>
            <td>
                <input type="text" v-model="MemberName">
            </td>
        </tr>
        <tr>
            <td>密码</td>
            <td>
                <input type="password" v-model="Pwd">
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <input type="button" value="登录" @click="Logins">
            </td>
        </tr>
    </table>
</template>
<script setup lang="ts">
import { onMounted,ref } from 'vue';
import axios from 'axios';


const MemberName=ref("");
const Pwd=ref("");

const Logins=()=>{

    axios.get('https://localhost:7030/api/Member/Login',
    
    {
        params:{
            MemberName:MemberName.value,
            Pwd:Pwd.value

        }
    }
    )

    .then(res=>{
        if(res.data>0){
            alert("登录成功");
        }
        else{
            alert("登录失败");
        }
    })


}

</script>